home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_13426.txt < prev    next >
Text File  |  1991-02-27  |  780b  |  20 lines

  1. -- card: 13426 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 4
  9. ----- text -----
  10.     void    Person::set(void)
  11.  
  12. This begins the definition for the set() method, or member function.  The SCOPE RESOLUTION OPERATOR '::' is required in order to indicate that this function is a member of the Person class, as previously declared.  (It is legal to have several functions with the same name as long as they are members of different classes.)  Again, the types of the return value and of the formal parameters (none in this case) are given.
  13.  
  14. The function body is enclosed in {} braces, and assigns new values to the instance variables age and weight.
  15.  
  16.  
  17.  
  18. -- part contents for background part 7
  19. ----- text -----
  20. 25